set(Qt5_SDK "D:/Qt/Qt5.14.2/5.14.2/msvc2015_64")
set(Qt5_DIR "D:/Qt/Qt5.14.2/5.14.2/msvc2015_64/lib/cmake/Qt5")
set(Qt5_DIR_INC  ${Qt5_SDK}/include)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

message("cmake app module")
# 下面两行是添加了寻找Qt5Config.cmake的路径
list(APPEND CMAKE_MODULE_PATH ${Qt5_DIR}/Qt5)
# 下面两行是添加了寻找Qt5WidgetsConfig.cmake的路径
list(APPEND CMAKE_MODULE_PATH ${Qt5_DIR}/Qt5Widgets)

find_package(Qt5 COMPONENTS Core Widgets  Network  REQUIRED)

# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.

# 设置${PROJECT_BINARY_DIR} = +build， 设置库文件输出路径

#添加头文件
include_directories(./)
include_directories( ${Qt5_DIR_INC}/)
include_directories(${Qt5_DIR_INC}/QtWidgets)
include_directories(${Qt5_DIR_INC}/QtCore) 
include_directories(${Qt5_DIR_INC}/QtGui)
include_directories(${Qt5_DIR_INC}/QtSql)
include_directories(${Qt5_DIR_INC}/QtNetwork)
include_directories(${Qt5_DIR_INC}/QtWebSockets)